/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx.exam;

/**
 * <p>Project: javase - Ex2
 * <p>Powered by webrx On 2021-11-26 09:15:17
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex2 {
    public static void main(String[] args) {
        int star = 7;
        int space = star;
        for (int i = 1; i <= star; i += 2) {
            --space;
            for (int m = 0; m <= space; m++) {
                System.out.print(" ");
            }
            for (int n = 0; n < i; n++) {
                System.out.print("*");
            }
            System.out.println();
        }
        for (int i = star - 2; i >= 1; i -= 2) {
            ++space;
            for (int m = 0; m <= space; m++) {
                System.out.print(" ");
            }
            for (int n = 0; n < i; n++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}
